package com.ozo.easy.pojo.dto;

import com.ozo.easy.common.model.BaseValidDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.*;
import lombok.Data;

import java.io.Serializable;

/**
 * 用户保存对象
 *
 * @author ozo
 * @version 1.0
 * @date 2025-01-26 16:01:47
 */
@Data
@Schema(description = "用户保存对象")
public class SysUserSaveDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull(message = "主键不能为空", groups = BaseValidDTO.Edit.class)
    @Schema(description = "id")
    private Long id;

    @NotNull(message = "部门id不能为空")
    @Schema(description = "部门id")
    private Long deptId;

    @NotBlank(message = "用户名不能为空")
    @Schema(description = "用户名")
    private String username;

    @NotBlank(message = "密码不能为空", groups = BaseValidDTO.Add.class)
    @Schema(description = "密码")
    private String password;

    @NotBlank(message = "昵称不能为空")
    @Schema(description = "昵称")
    private String nickname;

    @NotBlank(message = "性别不能为空")
    @Schema(description = "性别")
    private String gender;

    @Schema(description = "手机号")
    private String mobile;

    @Schema(description = "联系地址")
    private String address;

    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "备注")
    private String remark;

}
